<meta charset="utf-8">
<script>
    if(confirm("是否同意跳转至百度首页")){
        location = "http://www.baidu.com";
    }
</script>